/* Copyright: Ankitects Pty Ltd and contributors
 * License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */

html {
    background: var(--bg-color);
}

#fields {
    display: flex;
    flex-direction: column;
    margin: 5px;

    & > *, & > * > * {
        margin: 1px 0;

        &:first-child {
            margin-top: 0;
        }

        &:last-child {
            margin-bottom: 0;
        }
    }
}

.field {
    border: 1px solid var(--border);
    background: var(--frame-bg);

    &.dupe {
        background: var(--flag1-bg);
    }
}

.fname {
    vertical-align: middle;
    padding: 0;
}

body {
    margin: 0;
}

#topbutsOuter {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;

    position: sticky;
    top: 0;
    left: 0;
    z-index: 5;
    padding: 2px;

    background: var(--bg-color);
}

.topbuts > * {
    margin: 0 1px;

    &:first-child {
        margin-left: 0;
    }

    &:last-child {
        margin-right: 0;
    }
}

.topbut {
    width: 16px;
    height: 16px;
    margin-top: 4px;
}

.rainbow {
    background-image: -webkit-gradient(
        linear,
        left top,
        left bottom,
        color-stop(0, #f77),
        color-stop(50%, #7f7),
        color-stop(100%, #77f)
    );
}

button.linkb {
    -webkit-appearance: none;
    margin-bottom: -3px;
    border: 0;
    box-shadow: none;
    padding: 0px 2px;
    background: transparent;

    &:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

    .nightMode & > img {
        filter: invert(180);
    }
}

button:focus {
    outline: none;
}

button.highlighted {
    #topbutsleft & {
        background-color: lightgrey;

        .nightMode & {
            background: linear-gradient(0deg, #333333 0%, #434343 100%);
        }
    }

    #topbutsright & {
        border-bottom: 3px solid black;
    }

    .nightMode #topbutsright & {
        border-bottom: 3px solid white;
    }
}

#dupes {
    position: sticky;
    bottom: 0;

    text-align: center;
    background-color: var(--bg-color);

    &.is-inactive {
        display: none;
    }

    a {
        color: var(--link);
    }
}
